<?php

namespace App\Consts;

/**
 * 全局上传文件路径定义
 * @author dumpling
 */
class GlobalUploadConst
{

    // 上传状态 1上传成功 0上传失败
    public const UPLOAD_STATUS_FAIL = 0;
    public const UPLOAD_STATUS_SUCCESS = 1;

    // 来自，0前台，1后台
    public const FROM_FRONTEND = 0;
    public const FROM_BACKEND = 1;

    public const TYPE_ARTICLE = 1; // 文章
    public const TYPE_USER = 2; // 用户
    public const TYPE_PRO = 3;// 智囊团

    // 替换图片类型，1封面图，2正文图片
    public const REPLACE_RESOURCES_COVER = 1;
    public const REPLACE_RESOURCES_CONTENT = 2;

    // 用户
    public const OBJECT_USER = 'resources/user/'; // 基础路径
    public const USER_AVATAR_PATH = 'resources/user/avatar/'; // 头像

    // 协议
    public const AGREEMENT_OBJECT_PATH = 'resources/agreement/';

    // 文章
    public const OBJECT_ARTICLE_INFO_PATH = 'resources/article/info/'; //文章静态化资源
    public const OBJECT_ARTICLE_COVER_PATH = 'resources/article/cover/';//文章封面图
    public const OBJECT_ARTICLE_EDITOR_PATH = 'resources/article/editor/';//文章正文中的图片
    public const OBJECT_ARTICLE_BACKUPS_WORD_PATH = 'resources/article/backups/word/';//文章备份word
    public const OBJECT_ARTICLE_BACKUPS_PDF_PATH = 'resources/article/backups/pdf/';//文章备份pdf
    public const OBJECT_ARTICLE_SPIDER_PATH = 'resources/article/spider/';//文章抓取记录

    // 消息
    public const OBJECT_COMMENT_MSG_SEND = 'resources/message/comment/send/'; //我发出的评论
    public const OBJECT_COMMENT_MSG_RECEIVE = 'resources/message/comment/receive/'; // 我收到的评论
    public const OBJECT_LIKE_MSG_RECEIVE = 'resources/message/like/receive/'; // 我收到的点赞

    // 沙龙
    public const PRO_AVATAR_PATH = 'resources/pro/avatar/'; //智囊团头像

    // 分享
    public const SHARE_NOTE = 'resources/share/note/'; // 笔记金句分享
    public const SHARE_ARTICLE = 'resources/share/article/'; //文章金句分享

    // 用户推荐
    public const RECOMMEND_LIST_AVATAR_AREA = 'resources/recommend/avatar_area/'; //推荐列表头像区域

    // 沙龙
    public const OBJECT_SALON_COVER_PATH = 'resources/salon/cover/'; // 沙龙封面图
    public const OBJECT_SALON_INFO = 'resources/salon/info/';// 沙龙信息
    public const OBJECT_SALON_ADVANCE = 'resources/salon/advance/';// 沙龙预告内容资源
    public const OBJECT_SALON_REVIEW = 'resources/salon/review/';// 沙龙回顾内容资源
    public const OBJECT_SALON_APPLY_INFORMATION = 'resources/salon/apply_information/';// 沙龙报名须知资源
    public const OBJECT_SALON_MAP_BY_CONTENT = [
        'advance' => self::OBJECT_SALON_ADVANCE,
        'review' => self::OBJECT_SALON_REVIEW,
        'apply_information' => self::OBJECT_SALON_APPLY_INFORMATION,
    ];

    // 侵权
    public const OBJECT_TORT_ANNEX = 'resources/tort/annex/';
}
